package com.wdc.service.engine.impl;

import com.wdc.aggregates.TreeRich;
import com.wdc.service.engine.EngineBase;
import com.wdc.vo.EngineResult;
import com.wdc.vo.TreeNode;

import java.util.Map;

public class TreeEngineHandle extends EngineBase{
    @Override
    public EngineResult process(Long treeId, String userId, TreeRich treeRich, Map<String, String> decisionMatter) {
        //决策流程
        TreeNode treeNode = engineDecisionMaker(treeRich, treeId, userId, decisionMatter);
        //决策结果
        return new EngineResult(userId, treeId, treeNode.getTreeNodeId(), treeNode.getNodeValue());
    }
}
